p
  form class="form-inline"
    input type="text" value="#{params[:start_at]}" class="datetimepicker" name="start_at" placeholder="2017-04-15" class="form-control"
    input type="text"  value="#{params[:end_at]}" class="datetimepicker" name="end_at" placeholder="2017-04-20" class="form-control"
    input type="text" value="#{params[:user_code]}" name="user_code" placeholder="新疆" class="form-control"
    input type="text" value="#{params[:building_code]}" name="building_code" placeholder="受访者楼栋" class="form-control"
    input type="submit" value="查询" class="btn btn-info btn-sm"
= paginate @interviews
table.table.table-inverse.table-striped.table-bordered.table-hover
  thead
    tr
      th 来访者
      th 受访者
      th 受访者楼栋
      th 受访者楼号
      th 受访时间
      th 离开时间
      th 车牌号
      th 是否允许进入
      th 入口
      th 关键词
      th 受访原因
      th 受访小票号码
  tbody
    - @interviews.each do |interview|
      - guest = interview.guest
      - user = interview.user
      tr
        td = guest.idcard.name
        td = user.name
        td = user.building.code
        td = user.floor_code
        td = interview.entered_at
        td = interview.exited_at
        td = interview.car_code
        td = interview.flag ? '是' : '否'
        td = interview.door_name
        td = interview.keyword
        td = interview.reason
        td = interview.access_code
